class Animal(object):
    count = 0

    def __init__(self, name, age):
        self.name = name
        self.age = age
        Animal.count += 1

    def eat(self):
        print('i can eat')

    def call(self):
        print('i can call')

    @classmethod
    def show_animal_size(cls):
        print(f'当前类{cls}共有{cls.count}实例对象')

    @staticmethod
    def menu():
        print('1、开始')
        print('2、过程')
        print('3、结束')


class Dog(Animal):
    def __init__(self, name, age, type):
        super().__init__(name, age)
        self.type = type

    def call(self):
        print('wangwangwang')


class Bianmu(Dog):
    def __init__(self, name, age, type, action):
        super().__init__(name, age, type)
        self.action = action

    def call(self):
        print('bianmubianmu')


class Cat(Animal):
    def __init__(self, name, age, type):
        super().__init__(name, age)
        self.type = type

    def call(self):
        print('miaomiaomiao')


class Bird(Animal):
    def __init__(self, name, age, type):
        super().__init__(name, age)
        self.type = type

    def call(self):
        print('jijiji')


def service(obj):
    obj.call()

animal = Animal('动物',2)
dog = Dog('狗', 3, '哈士奇')
cat = Cat('猫', 2, '花猫')
bird = Bird('鸟', 3, '杜鹃')
# print(Animal.count)
Animal.show_animal_size()
print('-'*20)
animal.show_animal_size()
print('-'*20)
Animal.menu()
print('-'*20)
dog.menu()
print('-'*20)
dog.show_animal_size()
# service(Dog('狗', 3, '哈士奇'))
# service(Cat('猫', 2, '花猫'))
# service(Bird('鸟', 3, '杜鹃'))

# dog = Dog('狗', 3, '哈士奇')
# cat = Cat('猫', 2, '花猫')
# bird = Bird('鸟',3,'杜鹃')
# dog.call()
# cat.call()
# bianmu = Bianmu('狗', 3, '边牧','聪明')
# bianmu.call()
# print(Bianmu.mro())
